
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="<?php echo $this->baseUrl();?>/functions/ckeditor/ckeditor.js"></script>
<style type="text/css">
<!--
.STYLE1 {font-size: 24px}
.STYLE2 {font-size: 70px}
.STYLE7 {font-size: smaller}
.STYLE6 {font-size: medium}
-->
</style>
 	
	<!-- start about us -->
		<?php
		//初始化模板参数:$this->aboutusTitle、$this->aboutusTitleImg
		$this->aboutusTitle = 
		'四川大学网上第二课堂的学习论坛是一个特色网上交流平台，
		学生可在这里交流学习心得、体会，并体验论坛交流发帖的乐趣。';
		$this->aboutusTitleImg = $this->baseUrl().'/images/forumTitleImg.jpg';
		
		$aboutusLayout = new Zend_Layout();
		echo $aboutusLayout->render('/module/aboutus');
		?>
	<!-- end about us -->
	
	<!-- start logos -->
	<div class="logos">
		
	</div>
	<!-- end logos -->
	
	<!-- start content -->
	<div id="vg-content">

		<!-- start portfolio details -->
		<div id="portfolio-details" class="vg-page">
		
			<!-- start details -->
			<?php
				//				左侧信息
				$this->fromhref = '?fromhref=/forum/index';
				if($this->isloggin==true)
				{
					$userinfoLayout = new Zend_Layout();
					echo $userinfoLayout->render('/module/userinfo');
				}
				else
				{
					//左侧登录
					
					$loginLayout = new Zend_Layout();
					echo $loginLayout->render('/module/login');
				}  
			?>
			<article class="border-top c-four height-auto">
			
				<div class="vg-item-article vg-portfolio-details">
					<div class="forumdetailblock">
						<div class="toptitle">
							<h3><?php echo $this->escape($this->forum['title']);?></h3>
							<!-- <a href="javasript:onReply(
							<?php echo $this->baseUrl().'/forum/reply?replytoid='.$this->forum['id'];?>)"><div class="replyforum">回复本帖</div></a> -->
							<a href="#reply_content" target="_self"><div class="replyforum">回复本帖</div></a>
						</div>
						<div class="container3">
						
						<div class="thenew">
							<div class="lefthead">
								 <img  alt="img" src="<?php echo $this->baseUrl().'/'.$this->forum['authorheadimg'];?>"/>
								<h4><?php echo $this->escape($this->forum['author']);?></h4>
							</div>
							<div class="forumcontent">
								<div class="forumcontent2">
								<?php 
								echo $this->forum['content'];
								//echo $this->escape($this->forum['content']);
								?>
								  <!--又到了神奇的一天----宁九~伟森日，今天早上出门的时候见天空乌云密布，想必当有大事发生，果不其然，到了一教C406，冯老师身穿。。。-->
								</div>
								<div class="count" title="<?php echo $this->forum['countreply'];?>个回复"><?php echo $this->forum['countreply'];?></div>
								<div class ="timeblock">
								<!--楼主[2012.7.28]-->
								<?php date_default_timezone_set("Asia/Shanghai");echo '['.gmdate('Y-m-d H:i:s',$this->forum['time']+3600 * 8).']';?>
								</div>
				
							</div>
				
						</div>
						<ul>
							<?php
								if(!isset($this->floorbase))
								{
								    $this->floorbase = 0;
								}
								else
								{
								    $floor = $this->floorbase;
								}
								foreach($this->allreplyforum as $replyforum)
								{
								    $floor++;
								    echo '<li>
								    		<div class="thenew">
									      		<div class="lefthead">
										    		<img  alt="img" src="';
								    echo $this->baseUrl().'/'.$replyforum['authorheadimg'].'"/>';
									echo '<h4>'.$replyforum['author'].'  ('.$floor.'楼)</h4>';
									echo '</div>
										  <div class="forumcontent">
										  <div class="forumcontent2">';
									echo $replyforum['content'];
// 									echo $this->escape($replyforum['content']);
									echo '</div>
										  <div class ="timeblock">';
									date_default_timezone_set("Asia/Shanghai");
									echo '['.gmdate('Y-m-d H:i:s',$replyforum['time'] + 3600 * 8).']';	
									echo '         </div>
											    </div>
										    </div>
									     </li>';			    
								} 
							?>
							<!-- 静态模板 
							<li>
								<div class="thenew">
									<div class="lefthead">
										<img  alt="img" src="<?php echo $this->baseUrl();?>/images/forum/head2.png"/>
										<h4>zhi_jian</h4>
									</div>
									<div class="forumcontent">
										<div class="forumcontent2">
										早已听说过冯老师的霸气！
										</div>
										<div class ="timeblock">
										1楼[2012.7.28]
										</div>
									</div>
								</div>
							</li>
						-->
						</ul>
						<?php
							$this->pagerUrl = $this->baseUrl().'/forum/detail';
							$this->pagerPara = '&forumid='.$this->forum['id'];
							$pagerLayout = new Zend_Layout();
							echo $pagerLayout->render('/module/pager');
						?>				
						<div class="forumnewblock">
							<h3>发表回复</h3>
							<form action="<?php echo $this->baseUrl().'/forum/reply?replytoid='.$this->forum['id'];?>" method="post">
							<h4>回复内容<p><?php if(isset($this->tipcontent))echo $this->tipcontent;?></p></h4> 
							</br>
							<a name="reply_content"><textarea id="content" name="content"></textarea></a>  
							<script type="text/javascript">  
							CKEDITOR.replace( 'content' );  
							</script>
							<button onclick="javascript:onReply()">发表</button>
							</form>
						</div>
					</div>
						
					</div>
					
					<!-- title -->
					<!-- end title -->
					<!-- upload start -->
					<!-- upload ends -->
					<!-- download list -->
					
					<!-- enddownload list -->
					<!-- pager start -->
					
					<!-- pager end -->
			  </div>
				
			</article>
			<!-- end details -->
			
	  </div>
	  <!-- end portfolio details -->
		
	</div>
	<!-- end content -->

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-23864149-2']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
  function searchEnter(){
	if(event.keyCode==13){
		document.getElementById('searchform').submit();
		return false;
	}  
  }
</script>
<script type="text/javascript">
	function onReply(){
		
	}
</script>